//
// Created by Administrator on 2024/3/25.
//
#include<bits/stdc++.h>

using namespace std;

int main() {
    int n;
    while (cin >> n) {
        vector<int> a(n);
        for (int i = 0; i < n; i++)cin >> a[i];

        vector<int> dp(n);//dp[i] 代表以a[i]结尾的 a[i]的平台长度
        dp[0] = 1;//dp[i] 代表以a[0]结尾的 的平台长度为1
        for (int i = 1; i < n; i++) {
            if (a[i] == a[i - 1]) {
                dp[i] = 1 + dp[i - 1];
            } else {
                dp[i] = 1;
            }

        }
        cout << *max_element(dp.begin(), dp.end()) << endl;
    }

    return 0;
}